<?php /* Smarty version 2.6.26, created on 2013-03-06 05:48:34
         compiled from frm_questions_mng.html */ ?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
	<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header_frm.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
	<body>
		
		<form action="frm_questions_mng.php" method="post">			
			<div>
				选择章节：
			</div>
			<div>
				<select name="question_chapter_id">
					<?php unset($this->_sections['index']);
$this->_sections['index']['name'] = 'index';
$this->_sections['index']['loop'] = is_array($_loop=$this->_tpl_vars['chapters']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['index']['show'] = true;
$this->_sections['index']['max'] = $this->_sections['index']['loop'];
$this->_sections['index']['step'] = 1;
$this->_sections['index']['start'] = $this->_sections['index']['step'] > 0 ? 0 : $this->_sections['index']['loop']-1;
if ($this->_sections['index']['show']) {
    $this->_sections['index']['total'] = $this->_sections['index']['loop'];
    if ($this->_sections['index']['total'] == 0)
        $this->_sections['index']['show'] = false;
} else
    $this->_sections['index']['total'] = 0;
if ($this->_sections['index']['show']):

            for ($this->_sections['index']['index'] = $this->_sections['index']['start'], $this->_sections['index']['iteration'] = 1;
                 $this->_sections['index']['iteration'] <= $this->_sections['index']['total'];
                 $this->_sections['index']['index'] += $this->_sections['index']['step'], $this->_sections['index']['iteration']++):
$this->_sections['index']['rownum'] = $this->_sections['index']['iteration'];
$this->_sections['index']['index_prev'] = $this->_sections['index']['index'] - $this->_sections['index']['step'];
$this->_sections['index']['index_next'] = $this->_sections['index']['index'] + $this->_sections['index']['step'];
$this->_sections['index']['first']      = ($this->_sections['index']['iteration'] == 1);
$this->_sections['index']['last']       = ($this->_sections['index']['iteration'] == $this->_sections['index']['total']);
?>
					<option value="<?php echo $this->_tpl_vars['chapters'][$this->_sections['index']['index']]->getChapterId(); ?>
"><?php echo $this->_tpl_vars['chapters'][$this->_sections['index']['index']]->getChapterName(); ?>
</option>
					<?php endfor; endif; ?>
				</select>
			</div>
			<div>
				添加章节：
			</div>
			<div>
				<input type="text" name="chapter_name" />
				<input type="submit" value="添加"/>
			</div>
			<div>
				试题列表：
			</div>
			<div>
				<?php unset($this->_sections['index']);
$this->_sections['index']['name'] = 'index';
$this->_sections['index']['loop'] = is_array($_loop=$this->_tpl_vars['questions']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['index']['show'] = true;
$this->_sections['index']['max'] = $this->_sections['index']['loop'];
$this->_sections['index']['step'] = 1;
$this->_sections['index']['start'] = $this->_sections['index']['step'] > 0 ? 0 : $this->_sections['index']['loop']-1;
if ($this->_sections['index']['show']) {
    $this->_sections['index']['total'] = $this->_sections['index']['loop'];
    if ($this->_sections['index']['total'] == 0)
        $this->_sections['index']['show'] = false;
} else
    $this->_sections['index']['total'] = 0;
if ($this->_sections['index']['show']):

            for ($this->_sections['index']['index'] = $this->_sections['index']['start'], $this->_sections['index']['iteration'] = 1;
                 $this->_sections['index']['iteration'] <= $this->_sections['index']['total'];
                 $this->_sections['index']['index'] += $this->_sections['index']['step'], $this->_sections['index']['iteration']++):
$this->_sections['index']['rownum'] = $this->_sections['index']['iteration'];
$this->_sections['index']['index_prev'] = $this->_sections['index']['index'] - $this->_sections['index']['step'];
$this->_sections['index']['index_next'] = $this->_sections['index']['index'] + $this->_sections['index']['step'];
$this->_sections['index']['first']      = ($this->_sections['index']['iteration'] == 1);
$this->_sections['index']['last']       = ($this->_sections['index']['iteration'] == $this->_sections['index']['total']);
?>
				<div>
					<?php echo $this->_tpl_vars['questions'][$this->_sections['index']['index']]->getQuestionTitle(); ?>

				</div>
				<div>
					<?php echo $this->_tpl_vars['questions'][$this->_sections['index']['index']]->getQuestionAnswerA(); ?>

				</div>
				<div>
					<?php echo $this->_tpl_vars['questions'][$this->_sections['index']['index']]->getQuestionAnswerB(); ?>

				</div>
				<div>
					<?php echo $this->_tpl_vars['questions'][$this->_sections['index']['index']]->getQuestionAnswerC(); ?>

				</div>
				<div>
					<?php echo $this->_tpl_vars['questions'][$this->_sections['index']['index']]->getQuestionAnswerD(); ?>

				</div>
				<div>
					<?php echo $this->_tpl_vars['questions'][$this->_sections['index']['index']]->getQuestionAnswerCorrect(); ?>

				</div>
				<div>
					<?php echo $this->_tpl_vars['questions'][$this->_sections['index']['index']]->getQuestionAnalytic(); ?>

				</div>
				<?php endfor; endif; ?>
			</div>
			<div>
				添加试题：
			</div>
			<div>
				题目：
				<input type="text" name="question_title"/><br/>
				答案A：
				<input type="text" name="question_answer_a"/><br/>
				答案B：
				<input type="text" name="question_answer_b"/><br/>
				答案C：
				<input type="text" name="question_answer_c"/><br/>
				答案D：
				<input type="text" name="question_answer_d"/><br/>
				解析：
				<textarea name="question_analytic"></textarea>
				正确答案：
				<select name="question_answer_correct">
					<option value="0">A</option>
					<option value="1">B</option>
					<option value="2">C</option>
					<option value="3">D</option>
				</select><br/>
				<input type="submit" value="添加试题"/>
			</div>
		</form>
	</body>
</html>